package com.codenum.codegenerator;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* the Nhodqmfj type
*/
@SuppressWarnings("ALL")
public class Nhodqmfj {


        private static volatile Nhodqmfj instance;

        /**
        * 方法MethodMap
        */
        private Map<String, Method> methodMap = new HashMap<>(32);

        private Map<String, Object> saleTypeMap = new HashMap<>(64);

        public static Nhodqmfj getInstance() {
            if (instance == null) {
                synchronized (Nhodqmfj.class) {
                    if (instance == null) {
                        instance = new Nhodqmfj();
                    }
                }
            }
            return instance;
        }


        private Nhodqmfj() {

        }



    public  Boolean judgeDxlcgxwksn(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeQboujgzibk(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeCuwzcfmasx(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeGijgddrcxb(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeKqguqyuaaq(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeGrcbpidzrq(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeQnlxlhqsdk(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeBipdfwvsfc(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeJkhliuxhzz(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeVfesvakdhn(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeZorbucryct(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }

    private String  dxlcgxwksn;
    private String  qboujgzibk;
    private String  cuwzcfmasx;
    private String  gijgddrcxb;
    private String  kqguqyuaaq;
    private String  grcbpidzrq;
    private String  qnlxlhqsdk;
    private String  bipdfwvsfc;
    private String  jkhliuxhzz;
    private String  vfesvakdhn;
    private String  zorbucryct;


    public void setDxlcgxwksn(String dxlcgxwksn){
    this.dxlcgxwksn = dxlcgxwksn;
    }

    public String getDxlcgxwksn(){
    return this.dxlcgxwksn;
    }
    public void setQboujgzibk(String qboujgzibk){
    this.qboujgzibk = qboujgzibk;
    }

    public String getQboujgzibk(){
    return this.qboujgzibk;
    }
    public void setCuwzcfmasx(String cuwzcfmasx){
    this.cuwzcfmasx = cuwzcfmasx;
    }

    public String getCuwzcfmasx(){
    return this.cuwzcfmasx;
    }
    public void setGijgddrcxb(String gijgddrcxb){
    this.gijgddrcxb = gijgddrcxb;
    }

    public String getGijgddrcxb(){
    return this.gijgddrcxb;
    }
    public void setKqguqyuaaq(String kqguqyuaaq){
    this.kqguqyuaaq = kqguqyuaaq;
    }

    public String getKqguqyuaaq(){
    return this.kqguqyuaaq;
    }
    public void setGrcbpidzrq(String grcbpidzrq){
    this.grcbpidzrq = grcbpidzrq;
    }

    public String getGrcbpidzrq(){
    return this.grcbpidzrq;
    }
    public void setQnlxlhqsdk(String qnlxlhqsdk){
    this.qnlxlhqsdk = qnlxlhqsdk;
    }

    public String getQnlxlhqsdk(){
    return this.qnlxlhqsdk;
    }
    public void setBipdfwvsfc(String bipdfwvsfc){
    this.bipdfwvsfc = bipdfwvsfc;
    }

    public String getBipdfwvsfc(){
    return this.bipdfwvsfc;
    }
    public void setJkhliuxhzz(String jkhliuxhzz){
    this.jkhliuxhzz = jkhliuxhzz;
    }

    public String getJkhliuxhzz(){
    return this.jkhliuxhzz;
    }
    public void setVfesvakdhn(String vfesvakdhn){
    this.vfesvakdhn = vfesvakdhn;
    }

    public String getVfesvakdhn(){
    return this.vfesvakdhn;
    }
    public void setZorbucryct(String zorbucryct){
    this.zorbucryct = zorbucryct;
    }

    public String getZorbucryct(){
    return this.zorbucryct;
    }

    void setMethodMap(Map<String, Method> methodMap) {
        this.methodMap = methodMap;
    }

   void setSaleTypeMap(Map<String, Object> saleTypeMap) {
        this.saleTypeMap = saleTypeMap;
    }

    public Boolean judgeAttributeValue(String saleType, String methodName) {
        try {
            Object saleTypeObject = saleTypeMap.get(saleType);
            String targetMethod = methodName.replace("judge", "get");
            String attr = methodName.replace("judge", "");
            Method method = methodMap.get(targetMethod);
            Object invoke = method.invoke(saleTypeObject);
            return Objects.isNull(invoke) ? Boolean.FALSE : Objects.equals(invoke.toString().toLowerCase(), attr.toLowerCase());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

}